<template>
  <div class="not-found-page">
    <div class="not-found-content">
      <div class="error-icon">
        <van-icon name="warning-o" size="80" color="#ee0a24" />
      </div>
      <h1 class="error-title">404</h1>
      <p class="error-message">Page Not Found</p>
      <p class="error-description">
        The page you're looking for doesn't exist or has been moved.
      </p>
      <div class="error-actions">
        <van-button type="primary" round @click="goHome">
          Go Home
        </van-button>
        <van-button round @click="goBack">
          Go Back
        </van-button>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()

const goHome = () => {
  router.push('/')
}

const goBack = () => {
  router.go(-1)
}
</script>

<style lang="scss" scoped>
.not-found-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: $background-color;
  padding: $spacing-md;
}

.not-found-content {
  text-align: center;
  max-width: 400px;

  .error-icon {
    margin-bottom: $spacing-lg;
  }

  .error-title {
    font-size: 4rem;
    font-weight: $font-weight-bold;
    color: $text-color;
    margin-bottom: $spacing-sm;
  }

  .error-message {
    font-size: $font-size-xl;
    font-weight: $font-weight-medium;
    color: $text-color-2;
    margin-bottom: $spacing-sm;
  }

  .error-description {
    font-size: $font-size-sm;
    color: $text-color-3;
    line-height: 1.5;
    margin-bottom: $spacing-xl;
  }

  .error-actions {
    display: flex;
    gap: $spacing-md;
    justify-content: center;
  }
}
</style>